from media.media import *

config = k_vb_config()
config.max_pool_cnt = 1
config.comm_pool[0].blk_size = 1024
config.comm_pool[0].blk_cnt = 1
config.comm_pool[0].mode = VB_REMAP_MODE_NOCACHE

ret = MediaManager._config(config)
if not ret:
    raise RuntimeError(" 缓冲区配置失败。")

MediaManager.init()

buffer = MediaManager.Buffer.get(1024)

print(buffer)

buffer.__del__()

MediaManager.deinit()